home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / MATH / FSULTRA1.ZIP / ULTRATPU.PAS < prev    next >
Pascal/Delphi Source File  |  1992-06-18  |  2KB  |  82 lines

  1. FSU - ULTRA    The greatest random number generator that ever was
  2.         or ever will be.  Way beyond Super-Duper.
  3.         (Just kidding, but we think its a good one.)
  4.  
  5. Authors:    Arif Zaman (arif@stat.fsu.edu) and
  6.         George Marsaglia (geo@stat.fsu.edu).
  7.  
  8. Date:        27 May 1992
  9.  
  10. Version:    1.05
  11.  
  12. Copyright:    To obtain permission to incorporate this program into
  13.         any commercial product, please contact the authors at
  14.         the e-mail address given above or at
  15.  
  16.         Department of Statistics and
  17.         Supercomputer Computations Research Institute
  18.         Florida State University
  19.         Tallahassee, FL 32306.
  20.  
  21. See Also:    README        for a brief description
  22.         ULTRA.DOC    for a detailed description
  23.  
  24. -----------------------------------------------------------------------
  25. {
  26.   File: ULTRATPU.PAS (Program to make a .TPU file)
  27. }
  28. {$IFDEF x}            unit ultrax;
  29. {$ELSE} {$IFDEF f}        unit ultraf;
  30.     {$ELSE}    {$IFDEF fx}    unit ultrafx;
  31.         {$ELSE}        unit ultra;
  32. {$ENDIF}{$ENDIF}{$ENDIF}
  33.  
  34. interface
  35.  
  36. Function i32bit : LongInt;
  37. Function i31bit : LongInt;
  38. Function i16bit : Integer;    { You can declare this to be Word }
  39. Function i15bit : Integer;
  40. Function i8bit  : ShortInt;    { You can declare this to be Byte }
  41. Function i7bit  : ShortInt;
  42. Function i1bit  : Boolean;
  43. Function uni    : Single;
  44. Function vni    : Single;
  45. Function duni   : Double;
  46. Function dvni   : Double;
  47. Procedure rinit(x,y : LongInt);
  48.  
  49. type cp  = record c: Integer; p: Pointer; x: Array [0..36] of LongInt; end;
  50. var    SWBstate   : Array [0..4*sizeof(cp)+37] of byte;
  51. const    SWBsize    = sizeof(SWBstate);
  52.  
  53. implementation
  54.  
  55. var    tmpq    : Comp;
  56. const    neg31    : Integer = -31;
  57.     neg63    : Integer = -63;
  58.  
  59. Function i32bit : LongInt;   external;
  60. Function i31bit : LongInt;   external;
  61. Function i16bit : Integer;   external;
  62. Function i15bit : Integer;   external;
  63. Function i8bit  : ShortInt;  external;
  64. Function i7bit  : ShortInt;  external;
  65. Function i1bit  : Boolean;   external;
  66. Function uni    : Single;    external;
  67. Function vni    : Single;    external;
  68. Function duni   : Double;    external;
  69. Function dvni   : Double;    external;
  70. Procedure rinit(x,y : LongInt);  external;
  71.  
  72. {$IFDEF x}            {$L ultrx_tp.obj}
  73. {$ELSE}    {$IFDEF f}        {$L ultrf_tp.obj}
  74.     {$ELSE}    {$IFDEF fx}    {$L ultfx_tp.obj}
  75.         {$ELSE}        {$L ultra_tp.obj}
  76. {$ENDIF}{$ENDIF}{$ENDIF}
  77.  
  78. begin rinit(1234567,7654321);
  79. end.
  80.